package com.gohome.gohomechat.model;

import android.os.AsyncTask;
import android.os.Handler;
import android.os.Message;

import com.gohome.gohomechat.db.GoHomeDBTools;
import com.gohome.gohomechat.model.entify.CurrentUser;
import com.gohome.gohomechat.model.modellistener.PersonalModelInterface;
import com.gohome.gohomechat.presenter.callback.PersonalCallBack;

import java.util.List;

/**
 * Created by dllo on 16/3/9.
 */
public class PersonalModel implements PersonalModelInterface {


    @Override
    public void loadData(final PersonalCallBack callBack) {
        List<CurrentUser> currentUsers = GoHomeDBTools.getInstance().queryAllDatas_personal();
        callBack.success(currentUsers.get(currentUsers.size()-1));
    }
}
